﻿@model Authentication.Facebook.Models.ConfigurationModel
@{
    Layout = "_ConfigurePlugin";
}
<input id="active-menu-item" type="hidden" value="/Admin/ExternalAuthentication/Methods"/>
<form asp-controller="FacebookAuthenticationSettings" asp-area="Admin" asp-action="Configure" method="post">

    <div class="form-horizontal">
        <div class="form-body">
            <div class="note note-info">
                <p>
                    To configure authentication with Facebook follow these steps:<br/>
                    <br/>
                    1. Navigate to the <a href="https://developers.facebook.com/apps" target="_blank">Facebook for Developers</a> page and sign in. If you don't already have a Facebook account, use the <b>Sign up for Facebook</b> link on the login page to create one.<br/>
                    2. Tap the <b>+ Add a New App button</b> in the upper right corner to create a new App ID. (If this is your first app with Facebook, the text of the button will be <b>Create a New App</b>.)<br/>
                    3. Fill out the form and tap the <b>Create App ID button</b>.<br/>
                    4. The <b>Product Setup</b> page is displayed, letting you select the features for your new app. Click <b>Get Started</b> on <b>Facebook Login</b>.<br/>
                    5. Click the <b>Settings</b> link in the menu at the left, you are presented with the <b>Client OAuth Settings</b> page with some defaults already set.<br/>
                    6. Enter "@("https://yourstore.com/signin-facebook")" into the <b>Valid OAuth Redirect URIs</b> field.<br/>
                    7. Click <b>Save Changes</b>.<br/>
                    8. Click the <b>Dashboard</b> link in the left navigation.<br/>
                    9. Copy your App ID and App secret below.<br/>
                </p>
                <p>
                    <br/><br/>
                    To edit facebook settings in the grandnode application, please open the file App_Settings.json,
                    find section FacebookSettings and enter the correct values.
                </p>
            </div>
            <div class="form-group">
                <div class="col-md-3 col-sm-3 text-right">
                    <admin-label asp-for="ClientId" class="control-label"/>
                </div>
                <div class="col-md-9 col-sm-9">
                    <input asp-for="ClientId" type="text"
                           disabled class="form-control k-input text-box single-line"/>
                    <span asp-validation-for="ClientId"></span>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-3 col-sm-3 text-right">
                    <admin-label asp-for="ClientSecret" class="control-label"/>
                </div>
                <div class="col-md-9 col-sm-9">
                    <input asp-for="ClientSecret" type="text" disabled class="form-control k-input text-box single-line"/>
                    <span asp-validation-for="ClientSecret"></span>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-3 col-sm-3 text-right">
                    <admin-label asp-for="DisplayOrder" class="control-label"/>
                </div>
                <div class="col-md-9 col-sm-9">
                    <admin-input asp-for="DisplayOrder"/>
                    <span asp-validation-for="DisplayOrder"></span>
                </div>
            </div>
        </div>
        <div class="form-actions">
            <div class="row">
                <div class="offset-md-3 offset-sm-3 col-md-9 col-sm-9">
                    <input type="submit" name="save" class="btn green" value="@Loc["Admin.Common.Save"]"/>
                </div>
            </div>
        </div>
    </div>
</form>